/*
==========================================================================
GEA自动生成菜单SQL,只生成一次,按需修改.
生成日期：{{.table.CreateTime}}
生成路径: document/sql/{{.table.ModuleName}}/{{.table.BusinessName}}_menu.sql
生成人：{{.table.FunctionAuthor}}
==========================================================================
*/

-- 菜单 SQL
insert into sys_menu  (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark, method)
values('{{.table.FunctionName}}', '3', '1', '{{.table.BusinessName}}', 'business/{{.table.BusinessName}}/index', 1 ,'C', '0', '0', '/business/{{.table.BusinessName}}', '#', 'admin', '2020-01-01', 'admin', '2020-01-01', '{{.table.FunctionName}}菜单', '');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu  (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark, method)
values('{{.table.FunctionName}}查询', @parentId, '1',  '#', '', 1, 'F', '0', '0', '/business/{{.table.BusinessName}}/info',         '#', 'admin', '2020-01-01', 'admin', '2020-01-01', '','GET');

insert into sys_menu  (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark, method)
values('{{.table.FunctionName}}新增', @parentId, '2',  '#', '', 1, 'F', '0', '0', '/business/{{.table.BusinessName}}',          '#', 'admin', '2020-01-01', 'admin', '2020-01-01', '','POST');

insert into sys_menu  (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark, method)
values('{{.table.FunctionName}}修改', @parentId, '3',  '#', '', 1, 'F', '0', '0', '/business/{{.table.BusinessName}}',         '#', 'admin', '2020-01-01', 'admin', '2020-01-01', '','PUT');

insert into sys_menu  (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark, method)
values('{{.table.FunctionName}}删除', @parentId, '4',  '#', '', 1, 'F', '0', '0', '/business/{{.table.BusinessName}}',       '#', 'admin', '2020-01-01', 'admin', '2020-01-01', '','DELETE');

insert into sys_menu  (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark, method)
values('{{.table.FunctionName}}导出', @parentId, '5',  '#', '', 1, 'F', '0', '0', '/business/{{.table.BusinessName}}',       '#', 'admin', '2020-01-01', 'admin', '2020-01-01', '','GET');